1. Field of the Invention
The present invention relates to an absolute-value encoder device capable of detecting a plurality of rotation quantities (detecting the number of revolutions), and more particularly the invention relates to an absolute-value encoder device which is driven to operate by a battery even at the power stoppage.
2. Description of the Related Art
This type of the absolute-value encoder device includes a rotary plate which rotates together with a rotary shaft. The rotary plate is provided with a light shut-off portion, such as a digital code pattern or an analog slit pattern. Light that is emitted from a light emitting element passes through the light shut-off portion, and is received by a light receiving element. As output signals of the light receiving element, two pulse signals as electrical signals (a first pulse signal, e.g., a pulse signal of phase A, and a second pulse signal, e.g., a pulse signal of phase B) are produced one pulse every complete shaft revolution. A phase difference between those two pulse signals is 90.degree..
FIG. 8 is a block diagram showing a conventional absolute-value encoder device. In the figure, reference numeral 66 is clock generating means, e.g., a clock forming portion, for generating a clock signal for an internal circuit. The clock forming portion 66 includes a selector 66a therein. The selector 66a selects high or low frequency of a clock signal output from the clock forming portion 66 depending on whether electric power is supplied from a main power supply (usually electric power formed by transforming and rectifying a commercial AC power is supplied) or a power supply other than the main power supply (usually supplied from a battery).
Reference numeral 60 is an LED lighting portion which turns on an LED the clock pulse is in "H" level, and reference numeral 610 is pulse signal forming means, e.g., A/B phase forming portion.
When the LED is lighted by the LED lighting portion 60, light emitted from the LED is irradiated on a slit of an encoder disc. Light that passes through the is incident on the A/B phase forming portion 610, which in turn forms a first pulse signal, e.g., an A-phase pulse signal, and a second pulse signal, e.g., a B-phase signal.
Reference numeral 63 is rotation-quantity counting means, e.g., a multi-rotation counter, for holding a current value representative of the number of revolutions of the shaft. When a change in the A-phase pulse signal is detected from the present clock pulse, and the B-phase pulse signal is in "H" level, the multi-rotation counter 63 performs its counting operation.
When the B-phase pulse signal is in "H" level, the multi-rotation counter 63 counts up upon detection of a leading edge of the A-phase pulse signal, and counts down upon detection of a trailing edge thereof. Those counting operations are performed when a clock pulse is received from the internal clock generator.
Also during a power stoppage or the like in which no electric power is supplied from the main power supply to the motor, it sometimes happens that external force is accidentally applied to the shaft and the shaft automatically rotates, and that the brake is accidentally released and the shaft will start to rotate by itself. To cope with such cases, the absolute-value encoder device is arranged such that its internal circuit is operated by a battery even when the main power supply supplies no electric power.
In the conventional device, in case where the electric power is supplied from the battery, to control the power consumption of the battery, as described above, the period of the clock pulse signal to drive the internal circuit is set to be long (the frequency of the clock pulse signal is set to be low). In a case that the electric power is supplied from the main power supply, the period of the clock pulse signal to drive the internal circuit is set to be short (the frequency of the clock pulse signal is set to be high).
When the clock frequency is relatively high as of a clock waveform (2) in FIG. 7 in a state that the frequency of the clock pulse signal has been changed to the low frequency, the next clock pulse comes in within a period that the A-phase pulse signal has changed its level to high level (referred to as "H" level) but the B-phase pulse signal is still in "H" level. Therefore, the multi-rotation counter 63 can normally count. Where the frequency of the clock pulse signal is relatively low as of a clock waveform (1), even when the A-phase pulse signal changes its level to an "H" level, the clock pulse is not applied to the multi-rotation counter within the period that the B-phase pulse signal is in "H" level. Therefore, the multi-rotation counter 63 cannot count normally.
The following relation holds between a rotational speed which allows the multi-rotation counter 63 to normally count and a clock frequency. EQU Clock frequency (Hz)=rotational speed (number of revolution/sec).times.4
Where electric power is supplied from the battery, the follow problems arise. If the shaft is rotated at high speed in excess of that in the above equation, the multi-rotation counter 63 does not count normally. As a result, the absolute-value encoder device erroneously detects a plurality of rotation quantities. Further, if the frequency of the clock pulse signal is previously set at a high frequency, the battery is fast consumed.